<include file="public:header" />

<style>
.grid-table .col-id { width: 50px; }
.grid-table .col-checkbox { text-align: center; width: 35px; }
.grid-table .col-role { text-align: left; width: 120px; }
.grid-table .col-name { text-align: left;  }
.grid-table .col-status { width: 50px;  }
.grid-table .col-time { width: 140px; }
.grid-table .col-action { text-align: center; width: 120px; }
</style>





<script language="javascript">
function do_search(){
	$("#do_search").val(1); //导出，置do_search为0
	document.lkform.submit();
}
</script>



   <form id="lkform" name="lkform" action="" data-list="{:U('contact/listing')}" data-delete="{:U('contact/delete')}" method="post" class="lkcmsform">

<table width="100%" cellspacing="0" class="filter-table">
<tbody>
<tr>
	<td width="100%" align="left">
	
	{:L('创建时间')}:
	<input type="text" name="_filter_starttime" id="_filter_starttime" value="{$filter_starttime}" class="input-text" size="10" maxlength="100" readonly>
	<input type="text" name="_filter_endtime" id="_filter_endtime" value="{$filter_endtime}" class="input-text" size="10" maxlength="100" readonly>
	
	
	{:L('筛选')}:
    
    <select id="_filter_fieldname" name="_filter_fieldname" >
		<option value=""> - {:L('全部')} - </option>
		<option value="realname" <if condition="$filter_fieldname eq 'realname'"> selected="selected"</if> > {:L('姓名')} </option>
		<option value="mobile" <if condition="$filter_fieldname eq 'mobile'"> selected="selected"</if> > {:L('联系电话')} </option>
		<!--<option value="address" <if condition="$filter_fieldname eq 'address'"> selected="selected"</if> > {:L('地址')} </option>-->
		<!--<option value="wx_nickname" <if condition="$filter_fieldname eq 'wx_nickname'"> selected="selected"</if> > {:L('微信昵称')} </option>-->
		<!--<option value="openid" <if condition="$filter_fieldname eq 'openid'"> selected="selected"</if> > {:L('openid')} </option>-->
		<!--<option value="wx_nickname" <if condition="$filter_fieldname eq 'wx_nickname'"> selected="selected"</if> > {:L('微信昵称')} </option>-->
		<!--<option value="openid" <if condition="$filter_fieldname eq 'openid'"> selected="selected"</if> > {:L('openid')} </option>-->
		<!--<option value="user_id_crm" <if condition="$filter_fieldname eq 'user_id_crm'"> selected="selected"</if> >经销商ID</option>-->
		<!--<option value="username_crm" <if condition="$filter_fieldname eq 'username_crm'"> selected="selected"</if> >App账号</option>-->
		<!--<option value="realname_crm" <if condition="$filter_fieldname eq 'realname_crm'"> selected="selected"</if> >经销商姓名</option>-->
		<!--<option value="is_prize" <if condition="$filter_fieldname eq 'is_prize'"> selected="selected"</if> >奖品编号</option>-->
	</select>
	
	
    <input type="text" id="_f_search" name="_f_search" onchanges="form_list_submit(lkform);" class="" value="{$f_search}">


	<button onclick="form_list_submit(lkform);">{:L('开始')}</button>
	
	<!--
	<button onclick="
		document.getElementById('_f_order').value='';
		document.getElementById('_f_direc').value='';
		document.getElementById('_f_search').value='';

		document.getElementById('_filter_state').value='';
		form_list_submit(this.form);">{:L('清空')}</button>
	-->
	
	</td>
	<td nowrap="nowrap">
	
	<!--
		<select id="_filter_state" name="_filter_state" onchange="form_list_submit(lkform);" data-value="{$filter_state}">
		<option value=""> - {:L('审核状态')} - </option>
		<option value="1" <if condition="$filter_state eq '1'"> selected="selected"</if> > {:L('审核通过')} </option>
		<option value="0" <if condition="$filter_state eq '0'"> selected="selected"</if> > {:L('审核拒绝')} </option>
		<option value="1_4h" <if condition="$filter_state eq '1_4h'"> selected="selected"</if> > {:L('审核中')} </option>
		</select>
		-->
		
		
		<!--导出所有：-->
		<!--&nbsp;&nbsp;<a href="{:U('contact/export_attend')}" class="action ">{:L('导出')}</a>-->
		
		<!--按搜索条件导出：-->
		&nbsp;&nbsp;<a onclick="javascript:do_search();" href="javascript:void(0);" class="action ">{:L('导出')}</a>
		<input type="hidden" name="do_search" id="do_search" value="0">
		
	
	</td>
</tr>
</tbody>
</table>

<table width="100%" cellspacing="0" class="grid-table style-joomla2">
<thead>
<tr>
	<th><input type="checkbox" value="" id="chkallid" name="chkallid" onclick="form_checkbox_selectall(this.form);"></th>
	<th><!--{:L('id')}--><php>echo LkHTML::ListSort( L('id'), 'id', $f_order, $f_direc, 'form_ordering', L('按此列排序'));  </php></th>
	<!--<th><php>echo LkHTML::ListSort( L('手机'), 'contactname', $f_order, $f_direc, 'form_ordering', L('按此列排序'));  </php></th>-->
	
	<th>{:L('姓名')}</th>
	<th>{:L('性别(1男2女)')}</th>
	<th>{:L('联系电话')}</th>
	<th>{:L('电子邮箱')}</th>
	<th>{:L('反馈标题')}</th>
	<th>{:L('反馈内容')}</th>
	<!--<th>{:L('地址')}</th>-->
	<!--<th>{:L('微信昵称')}</th>-->
	<!--<th>{:L('微信头像')}</th>-->
	<!--<th>经销商ID</th>-->
	<!--<th>App账号</th>-->
	<!--<th>经销商姓名</th>-->
	<!--<th>地域</th>-->
	<!--<th>奖品编号</th>-->
	<!--<th>{:L('分数')}</th>--><!--假分数-->
	<!--<br>与奖品挂钩。当前规则：80分或60分为中奖。<br>80分小于等于3个，60分小于等于5个，<br>中奖的概率是十分之一，没中奖的给50分。-->
	<!--<th>{:L('真分数')}<br>用户实际玩到的分数。<br>与奖品无关。</th>-->
	<!--<th>{:L('百分比')}</th>-->
	<!--<th>{:L('省份')}</th>-->
	<!--<th>{:L('城市')}</th>-->
	<!--<th>{:L('openid')}</th>-->
	<!--<th>{:L('微信昵称')}</th>-->
	<!--<th>{:L('上传照片')}</th>-->
	
	<!--<th>{:L('今日单数')}</th>-->
	<!--<th>{:L('今日已抽数')}</th>-->
	<!--<th>{:L('今日剩抽数')}</th>-->
	
	<th>{:L('提交时间')}</th>
	
	<!--<th>{:L('openid')}</th>-->
	<!--<th>{:L('分享过(1是，0否)')}</th>-->
	<!--<th>{:L('分享被多少人点击')}</th>-->
	
	<!--
	<th>{:L('微信openid')}</th>
	<th>{:L('微信昵称')}</th>
	<th>{:L('微信头像')}</th>
	-->
	
	<!--
	<th>{:L('照片')}</th>
	<th>{:L('语音')}</th>
	<th>{:L('微信昵称')}</th>
	<th>{:L('微信头像')}</th>
	-->
	
	<!--<th>{:L('修改时间')}</th>-->
	<!--<th>{:L('审核状态')}</th>-->
	<!--<th class="cell-action" nowrap="nowrap">{:L('审核操作')}</th>-->
	<!--<th >操作</th>-->
</tr>
</thead>
<tbody>
<volist name="dataset" id="rec" >
<tr>
	<td class="cell-checkbox"><input type="checkbox" value="{$rec['id']}" name="id[]" /></td>
	<td class="cell-id">{$rec['id']}</td>
	<!--<td>{$rec['mobile']}</td>-->
	
	<td>{$rec['realname']}</td>
	<td>{$rec['sex']}</td>
	<td>{$rec['mobile']}</td>
	<td>{$rec['email']}</td>
	<td>{$rec['title']}</td>
	<td>{$rec['summary']}</td>
	<!--<td>{$rec['address']}</td>-->
	<!--<td>{$rec['wx_nickname']}</td>-->
	<!--<td><if condition="$rec['wx_headimgurl'] neq ''"><a href='{$rec['wx_headimgurl']}' target="_blank"><img src='{$rec['wx_headimgurl']}' width="50" height="50"></a></if></td>-->
	<!--<td>{$rec['user_id_crm']}</td>-->
	<!--<td>{$rec['username_crm']}</td>-->
	<!--<td>{$rec['realname_crm']}</td>-->
	<!--<td>{$rec['address']}</td>-->
	<!--<td>{$rec['is_prize']}</td>-->
	<!--<td>{$rec['score_jia']}</td>-->
	<!--<td>{$rec['score']}</td>-->
	<!--<td>{$rec['percent']}</td>-->
	<!--<td>{$rec['wx_province']}</td>-->
	<!--<td>{$rec['wx_city']}</td>-->
	<!--<td>{$rec['openid']}</td>-->
	<!--<td>{$rec['wx_nickname']}</td>-->
	<!--<td><if condition="$rec['headpic'] neq ''"><a href='../public/wx_headpic/{$rec['wx_headpic_path']}' target="_blank"><img src='../public/wx_headpic/{$rec['wx_headpic_path']}' width="50" height="50"></a></if></td>-->
	
	
	<!--<td>{$rec['danshu_today']}</td>-->
	<!--<td>{$rec['chou_used_today']}</td>-->
	<!--<td>{$rec['chou_free_today']}</td>-->
	
	<td>{$rec['addtime']}</td>
	
	<!--<td>{$rec['openid']}</td>-->
	<!--<td>{$rec['is_fenxiang_ture']}</td>-->
	<!--<td>{$rec['is_fenxiang_number']}</td>-->
	
	<!--
	<td>{$rec['openid']}</td>
	<td>{$rec['wx_nickname']}</td>
	<td><if condition="$rec['wx_headimgurl'] neq ''"><a href='{$rec['wx_headimgurl']}' target="_blank"><img src='{$rec['wx_headimgurl']}' width="50" height="50"></a></if></td>
	-->
	
	<!--<td><if condition="$rec['headpic'] neq ''"><a href='../public/web_headpic/{$rec['headpic']}' target="_blank"><img src='../public/web_headpic/{$rec['headpic']}' width="50" height="50"></a></if></td>-->
	<!--<td><if condition="$rec['voice'] neq ''"><a href='/cms/down/index?path=../public/web_voice/{$rec['voice']}' >语音</a></if></td>-->
	<!--<td><if condition="$rec['voice'] neq ''"><a href='/cms/down/index?path=d:/www/rongtai/public/web_voice/abd.mp3' >语音</a></if></td>-->
	<!--<td><if condition="$rec['voice'] neq ''"><a href='/cms/down/index?path={$rec['voice']}&rename=voice_{$rec['mobile']}_contact_{$rec['id']}.mp3' >语音</a></if></td>-->
	
	<!--<td>{$rec['wx_nickname']}</td>-->
	<!--<td><if condition="$rec['wx_headpic_path'] neq ''"><a href='../public/wx_headpic/{$rec['wx_headpic_path']}' target="_blank"><img src='../public/wx_headpic/{$rec['wx_headpic_path']}' width="50" height="50"></a></if></td>-->
	<!--<td class="cell-time"><if condition="$rec['modify_time'] gt '0'">{$rec.modify_time|date='Y-m-d H:i:s',###}</if><if condition="$rec['modify_time'] eq '0'">{$rec.create_time|date='Y-m-d H:i:s',###}</if></td>-->
	
	<!--
	<td>
	<if condition="$rec['status_now'] eq '审核通过'"><span style="color:#02c44f;" id="shenhe_status_{$rec['id']}" >{$rec['status_now']}</span></if>
	<if condition="$rec['status_now'] eq '审核中'"><span style="color:#a2bf01;" id="shenhe_status_{$rec['id']}" >{$rec['status_now']}</span></if>
	<if condition="$rec['status_now'] eq '审核拒绝'"><span style="color:#ff0000;" id="shenhe_status_{$rec['id']}" >{$rec['status_now']}</span></if>
	</td>
	-->
	
	<!--<td class="cell-time"><if condition="$rec['modify_time'] gt '0'">{$rec.modify_time|date='Y-m-d H:i:s',###}</if></td>-->
	<!--<td class="cell-status"> <a <?php if($CurrAccount['Account-Role']=='administrator' || $CurrAccount['Account-Role']=='admin'){ ?>href="javascript:table_change_status({$rec['id']},'form_record_status',{$rec['user_id']})"<?php }?> id="form_record_status_{$rec['id']}"><img src="__ROOT__/statics/images/status_{$rec['status']}.gif" /></a> </td>-->
	<!--<td class="cell-action"><a href="{:U('contact/edit', array('id'=>$rec['id']))}" class="action action-edit">{:L('编辑')}</a></td>-->
	
	<!--
	<td class="cell-action">
	<a href="javascript:table_change_status_set_yes({$rec['id']},'form_record_status')" class="action " >{:L('审核通过')}</a>
	<a href="javascript:table_change_status_set_no({$rec['id']},'form_record_status')" class="action " >{:L('审核拒绝')}</a>
	</td>
	
	<td class="cell-action"><a href="{:U('contact/edit', array('id'=>$rec['id']))}" class="action action-edit">{:L('编辑')}</a></td>
	-->
	
</tr>
</volist>
</tbody>
<tfoot>
<tr><td colspan="13">
	<!--<label for="check_box" style="float:left;">全选/取消</label>-->
	<?php if($CurrAccount['Account-Role']=='administrator' || $CurrAccount['Account-Role']=='admin'){ ?><input type="submit" class="button" name="dosubmit" value="删除" onclick="return confirm('你确定要删除吗？')" style="float:left;margin-left:10px;"/><?php }?>
	<div id="pages">{$page}</div>
</td></tr>
</tfoot>
</table>


       <input type="hidden" name="_f_order" value="{$f_order}" />
       <input type="hidden" name="_f_direc" value="{$f_direc}" />


</form>


<script language="javascript">

    function form_ordering( order, dir, task ) {
        var form = document.lkform;
        form._f_order.value = order;
        form._f_direc.value = dir;
        form.submit( task );
    }

function form_checkbox_selectall(form){
	LkCmsForm.CheckBoxAll(form, 'name', 'id[]', 'chkallid');
}
function form_list_submit(form){
	$("#do_search").val(0);  //查询，置do_search为0
	$ = jQuery;
	$(form).prop('action', $(form).data('list'));
	$(form).submit();
}
function form_delete_submit(form){
//	$ = jQuery;
//	$(form).prop('action', $(form).data('delete'));	
//	var ids='';
//	$(form).children("input[name='id[]']:checked").each(function(i, n){
//		ids += $(n).val() + ',';
//	});
//	var info = "{:L('请选择你需要删除的用户')}";
//	if(ids=='') {
//		window.top.art.dialog({content:info,lock:true,width:'200',height:'50',time:1.5},function(){});
//		return false;
//	}
//	form.submit();
}
function table_change_status(id, type, user_id){
    $.get("{:U('contact/ajax_change_status')}", { id: id, type: type , user_id: user_id}, function(jsondata){
    	var status = jsondata.status;
    	var result = jsondata.result;
    	if( status == 'true'){
			$("#"+type+"_"+id+" img").attr('src', '__ROOT__/statics/images/status_'+ result +'.gif');
    	}
	}); 
}


//设为审核通过
function table_change_status_set_yes(id, type, user_id){
    $.get("{:U('contact/ajax_change_status_set_yes')}", { id: id, type: type , user_id: user_id}, function(jsondata){
    	var status = jsondata.status;

    	if( status == 'true'){
    		$("#shenhe_status_"+id).html('审核通过');
    		$("#shenhe_status_"+id).css({"color":"#02c44f"});
			//alert('操作成功');
    	}
	}); 
}


//设为审核拒绝
function table_change_status_set_no(id, type, user_id){
    $.get("{:U('contact/ajax_change_status_set_no')}", { id: id, type: type , user_id: user_id}, function(jsondata){
    	var status = jsondata.status;

    	if( status == 'true'){
    		$("#shenhe_status_"+id).html('审核拒绝');
    		$("#shenhe_status_"+id).css({"color":"#ff0000"});
			//alert('操作成功');
    	}
	}); 
}





;(function($){
	$(document).ready(function(){
		

	});

})(jQuery);
</script>

    <link href="__ROOT__/scripts/timefiles/style.css" rel="stylesheet" type="text/css" />
    <link href="__ROOT__/scripts/timefiles/ui.datepicker.css" rel="stylesheet" type="text/css" />
    <link href="__ROOT__/scripts/timefiles/ui.theme.css" rel="stylesheet" type="text/css" />
    <link href="__ROOT__/scripts/timefiles/ui.core.css" rel="stylesheet" type="text/css" />
    <script src="__ROOT__/scripts/timefiles/ui.datepicker.js" type="text/javascript"></script>
    <script type="text/javascript">
         $(function() {
             $("#_filter_starttime").datepicker();
             $("#_filter_endtime").datepicker();
         });
	</script>
	
	
	
<include file="public:footer" />